home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / VIEWEX.PAK / SIMPVW.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  83 lines

  1. // simpvw.h : interface of the simple view classes
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. // CTextView - text output
  14. // CColorView - color output
  15.  
  16. /////////////////////////////////////////////////////////////////////////////
  17.  
  18. class CTextView : public CView
  19. {
  20. protected: // create from serialization only
  21.     CTextView();
  22.     DECLARE_DYNCREATE(CTextView)
  23.  
  24. // Attributes
  25. public:
  26.     CMainDoc* GetDocument()
  27.             {
  28.                 ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
  29.                 return (CMainDoc*) m_pDocument;
  30.             }
  31.  
  32. // Operations
  33. public:
  34.  
  35. // Implementation
  36. public:
  37.     virtual ~CTextView();
  38.     virtual void OnDraw(CDC* pDC);      // overridden to draw this view
  39.  
  40. // Generated message map functions
  41. protected:
  42.     //{{AFX_MSG(CTextView)
  43.     afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
  44.     //}}AFX_MSG
  45.     DECLARE_MESSAGE_MAP()
  46. };
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49.  
  50. class CColorView : public CView
  51. {
  52. protected: // create from serialization only
  53.     CColorView();
  54.     DECLARE_DYNCREATE(CColorView)
  55.  
  56. // Attributes
  57. public:
  58.     CMainDoc* GetDocument()
  59.             {
  60.                 ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
  61.                 return (CMainDoc*) m_pDocument;
  62.             }
  63.  
  64. // Operations
  65. public:
  66.  
  67. // Implementation
  68. public:
  69.     virtual ~CColorView();
  70.     virtual void OnDraw(CDC* pDC);      // overridden to draw this view
  71.     virtual void OnActivateView(BOOL bActivate, CView* pActivateView,
  72.                     CView* pDeactiveView);
  73.  
  74. // Generated message map functions
  75. protected:
  76.     //{{AFX_MSG(CColorView)
  77.     afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
  78.     //}}AFX_MSG
  79.     DECLARE_MESSAGE_MAP()
  80. };
  81.  
  82. /////////////////////////////////////////////////////////////////////////////
  83.